<?php
require_once "managerSession.php";
if($manager["role"]=="超级管理员"&&isset($_REQUEST["wxid"])){
    $wxid=$_REQUEST["wxid"];
    if(!empty($core->GetManageByWx_Id($wxid))){
        echo $wxid."已经是管理员！";
    }
    $user=GetUserInfo($wxid);
    if (isset($user->nickname)){
        $ok=$core->AddManage($wxid,$user->nickname,"普通" );
        if (!$ok){
            echo "添加成功";
        }else{
            echo "添加失败";
        }
    }else{
        echo $wxid."不是一个正确的OpenId!";
    }

}